<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
</head>
<body>
<div id="Application">
    <div>
        <input :value="inputText" @input="action" />
        <div>{{ inputText }}</div>
        <button @click="inputText = ''">清空</button>
    </div>
</div>
<script>
    const App = Vue.createApp({
        data() {
            return {
                inputText: ""
            };
        },
        methods: {
            action(event) {
                this.inputText = event.target.value;
            }
        }
    });
    App.mount("#Application");
</script>
</body>
</html>
